#ifndef _AES_H
#define _AES_H

#ifdef  __cplusplus
extern "C" {
#endif

#ifndef uint8
#define uint8  unsigned char
#endif

#ifndef uint32
#define uint32 unsigned long int
#endif

#define AES_ENCRYPT     1
#define AES_DECRYPT     0
typedef struct
{
    uint32 erk[64];     /* encryption round keys */
    uint32 drk[64];     /* decryption round keys */
    int nr;             /* number of rounds */
}
aes_context;

int  aes_set_key( aes_context *ctx, uint8 *key, int nbits );
void aes_encrypt( aes_context *ctx, uint8 input[16], uint8 output[16] );
void aes_decrypt( aes_context *ctx, uint8 input[16], uint8 output[16] );
void aes_cfb128_encrypt(unsigned char *in,unsigned char *out,long length,aes_context *schedule,unsigned char *ivec,int *num,int enc);


#ifdef  __cplusplus
}

#endif
#endif /* aes.h */
